<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>with vue1</title>
</head>
<body>
    <div id="app"></div>
    <script src="./vue/index.js"></script>
    <script>
        const vm = new Vue({
            data() {
                return {
                    title: "我是第一次标题"
                }
            },
            mounted() {
                setTimeout(() => {
                    console.log("定时器");
                    this.title = "我是第二次标题";
                }, 1000)
            },
            render() {
                // 采用正式dom创建节点
                const h3 = document.createElement('h3')
                h3.textContent = this.title;
                return h3
            }
        });
        vm.$mount('#app');
    </script>
</body>
</html>